/*
 *  $Id: Magebloom.cs 1057 2010-05-19 13:40:21Z thenn.erannor $
 *  This file is a part of Ragima CCG.
 *  (C) 2008-2009 Ragima development group.
 *
 *  Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Earth.Lands {
    public class Magebloom : LandCard {
        public Magebloom() : base("001_e_l_magebloom") {
            Level = CompleteLevel.ReadyForTest;
            Version = 0;
            Element = ElementType.Earth;
            Value = 100;
            AddManaCost(3);
        }

        public override void SetAbilities(ICollector<AbilityCard> abilities) {
            abilities.Add<Abilities.Magebloom>();
        }
    }
}

namespace Ragima.Cards001.Earth.Abilities {
    public class Magebloom : AbilityCard {
        public Magebloom() : base("001_e_a_magebloom") {
            Level = CompleteLevel.ReadyForTest;
            SetPictureSource<Lands.Magebloom>();
            Element = ElementType.Earth;
            LogMessage = GetLogPhrase();
        }

        public override void LogAction(Log log, TargetArgs args) {
            log.Add(LogMessage, args.Player, args.Caster, this);
        }

        public override void DoAction(TargetArgs args) {
            Land magebloom = args.Caster as Land;
            if (magebloom == null)
                return;
            args.Player.IncrementMana(ElementType.Earth, 3);
            magebloom.Remove();
        }
    }
}